<table summary="" id="pagehead" cellpadding="0" cellspacing="0" border="0" width="100%">
	<tr>
		<td><h1>文章管理</h1></td>
		<td class="actions">
			<table summary="" cellpadding="0" cellspacing="0" border="0" align="right">
				<tr>
                	<td <?=$this->list_act ?>><a href="<?='?app='.APP.'&mod='.MOD;?>">文章列表</a></td>
					<td <?=$this->add_act ?>><a href= "<?='?app='.APP.'&mod='.MOD.'&act=add';?>">发布文章</a></td>
					<td <?=$this->edit_act ?>><a href="#">编辑文章</a></td>
				</tr>
			</table>
		</td>
	</tr>
</table>

<script>
$(function(){
	$('#searchtype').val(INPUT_GET.searchtype);
    $('#keyword').val(INPUT_GET.keyword);
	
	// 删除
    $('img[del]').click(function (){
        var uid = $(this).attr('del');
        var nickname = $(this).attr('nickname');

        if(confirm('真的要删除'+nickname+'吗？')) {
            $.getJSON('?app=<?php echo APP; ?>&mod=delete',{uid:uid},function(data){
                if (data.state <= 0)
                {
                    alert(data.message);
                    return false;
                }
                 alert(data.message);
			 	location.href = location.href;
            });
        }
    });
});
</script>
<div class="search">
    <form id='search'>
        <span>
            文章标题
        </span>
        <span>
            <input type="text" name="keyword" id="keyword" value="" />
        </span>
        <span><input type="submit" value="搜索" /><?php echo showhide(array('app'=>APP,'mod'=>MOD)); ?></span>
    </form>
</div>
<div class="line_1"></div>
<table width="100%" cellpadding="0" cellspacing="0" border="0" class="table1">
       <tr>
            <th class="th0" rel="article_id">编号</th>
            <th class="th1">文章标题</th>
            <th class="th0" rel="author_name">发布人</th>
            <th class="th1" rel="num">发布时间</th>
            <th class="th0">操作</a>
       </tr>
       <?php foreach((array)$this->article_list as $article): ?> 
       <tr>
            <td><?php echo $article['article_id']; ?></td>
            <td><?php echo $article['title']; ?></td>
            <td><?php echo $article['author_name']; ?></td>
            <td><?php echo date('Y-m-d H:i:s',$article['created_time']); ?></td>
            <td>
            	<?php echo opt('edit','?app='.APP.'&mod='.MOD.'&act=modi&article_id='.$article['article_id']); ?>
                <?php echo opt('trash','javascript:;','del="'.$article['article_id'].'" nickname="'.$article['title'].'"');?>
            </td>
       </tr>
       <?php endforeach; ?>
</table>
<div class="page_num">
     <div class="fl">
        <span></span>
     </div>
     <div class="fr">
        <p class="cpager">
            <?php echo $this->pager; ?>
        </p>
     </div>
</div>